testinfobar: Stop using gtk_info_bar_get_content_area()
authorTimm Bäder <mail@baedert.org>
Fri, 14 Feb 2020 17:14:33 +0000 (18:14 +0100)
committerTimm Bäder <mail@baedert.org>
Sat, 15 Feb 2020 16:18:26 +0000 (17:18 +0100)
We have an easier way of adding widgets to the content area of an
infobar: Just gtk_container_add() them like usual.

tests/testinfobar.c

index cb78f3f82dc0c43db9c49d4af499c3202a1a4fe6..874db9cc52055535c8a5c70dd4b98876c7ef1691 100644 (file)
@@ -35,7 +35,7 @@ on_activate (GApplication *application,
   box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
 
   info_bar = gtk_info_bar_new ();
-  gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar))),
+  gtk_container_add (GTK_CONTAINER (info_bar),
                      gtk_label_new ("Hello!\nI am a GtkInfoBar"));
 
   widget = gtk_toggle_button_new_with_label ("Toggle :visible");